package com.ocom.accesservice.controller;


import com.ocom.accesservice.service.GroupPerService;
import com.ocom.common.constant.AccessServiceUrl;
import com.ocom.common.resp.Result;
import com.ocom.common.utils.ResultUtil;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class AccessController {



	Logger logger= LoggerFactory.getLogger(AccessController.class);


	@Autowired
	GroupPerService groupPerService;
	/**
	 * 添加区域
	 * */
	@PostMapping(AccessServiceUrl.URL_clearAccessByUser)
	public Result clearAccessByUser(Long companyId, Long pId, Long userId){
		logger.info("移除人员:"+companyId.toString()+ ",userId:"+userId.toString());
		groupPerService.removeWhiteUser(companyId,userId);
		return ResultUtil.success();
	}
}
